package com.design.观察者模式;

/**
 * @author: sun.hongliang
 * @create: 2019/09/02 17:39
 */
public class Main {
    public static void main(String[] args) {
        Subject subject = new Subject();
        new OctalObserver(subject);
        new BinaryObserver(subject);

        System.out.println("First state change: 15");
        subject.setState(15);

        System.out.println("Second state change: 10");
        subject.setState(10);

    }
}
